package org.example.demo.service;

import org.example.demo.entity.District;
import org.example.demo.mapper.DistrictDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DistrictService {

    @Autowired
    private DistrictDao districtDao;

    public int add(District district){
        return districtDao.add(district);
    }

    public int del(Integer id){
        return districtDao.del(id);
    }

    public int update(District district){
        return districtDao.update(district);
    }
    public District get(Integer id){
        return districtDao.get(id);
    }

    public List<District> getAll(){
        return districtDao.getAll();
    }
}
